<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><b>gpu</b></li><li class="navelem"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classfaiss_1_1gpu_1_1Tensor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Our tensor type.  
 <a href="classfaiss_1_1gpu_1_1Tensor.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classfaiss_1_1gpu_1_1Tensor.png" usemap="#faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;_map" alt=""/>
  <map id="faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;_map" name="faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;_map">
<area href="classfaiss_1_1gpu_1_1DeviceTensor.html" alt="faiss::gpu::DeviceTensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;" shape="rect" coords="0,56,358,80"/>
<area href="classfaiss_1_1gpu_1_1HostTensor.html" alt="faiss::gpu::HostTensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;" shape="rect" coords="368,56,726,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a072171dcad6979257d1d28dfdc9c6eb0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>NumDim</b> = Dim
 }</td></tr>
<tr class="separator:a072171dcad6979257d1d28dfdc9c6eb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a828306db3c0bcaecca6d3888eb3bda24"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>IsContig</b> = Contig
 }</td></tr>
<tr class="separator:a828306db3c0bcaecca6d3888eb3bda24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09e258dd21d1c8634c369c43800d05ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09e258dd21d1c8634c369c43800d05ce"></a>
typedef T&#160;</td><td class="memItemRight" valign="bottom"><b>DataType</b></td></tr>
<tr class="separator:a09e258dd21d1c8634c369c43800d05ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3df475753175dcd559fda0be1d7fc2f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3df475753175dcd559fda0be1d7fc2f1"></a>
typedef IndexT&#160;</td><td class="memItemRight" valign="bottom"><b>IndexType</b></td></tr>
<tr class="separator:a3df475753175dcd559fda0be1d7fc2f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a052a3ee18b0d0c3f494cd65377547ede"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a052a3ee18b0d0c3f494cd65377547ede"></a>
typedef PtrTraits&lt; T &gt;::PtrType&#160;</td><td class="memItemRight" valign="bottom"><b>DataPtrType</b></td></tr>
<tr class="separator:a052a3ee18b0d0c3f494cd65377547ede"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89e9ee538561a5eae8af40ff619a7ec0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89e9ee538561a5eae8af40ff619a7ec0"></a>
typedef <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, <br class="typebreak"/>
IndexT, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>TensorType</b></td></tr>
<tr class="separator:a89e9ee538561a5eae8af40ff619a7ec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a151fd78dd5695b1346739e32a9e76309"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a151fd78dd5695b1346739e32a9e76309"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a151fd78dd5695b1346739e32a9e76309">Tensor</a> ()</td></tr>
<tr class="memdesc:a151fd78dd5695b1346739e32a9e76309"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br/></td></tr>
<tr class="separator:a151fd78dd5695b1346739e32a9e76309"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad91651847f8b9f68bbf8e55cdfadf60b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad91651847f8b9f68bbf8e55cdfadf60b"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad91651847f8b9f68bbf8e55cdfadf60b">Tensor</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;t)=default</td></tr>
<tr class="memdesc:ad91651847f8b9f68bbf8e55cdfadf60b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <br/></td></tr>
<tr class="separator:ad91651847f8b9f68bbf8e55cdfadf60b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ae06b3adf94ff6e57c3779e3b0efc1d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ae06b3adf94ff6e57c3779e3b0efc1d"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a8ae06b3adf94ff6e57c3779e3b0efc1d">Tensor</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;&amp;t)=default</td></tr>
<tr class="memdesc:a8ae06b3adf94ff6e57c3779e3b0efc1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move constructor. <br/></td></tr>
<tr class="separator:a8ae06b3adf94ff6e57c3779e3b0efc1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55896db55a03e43a1789886aa22a0ba4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55896db55a03e43a1789886aa22a0ba4"></a>
__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a55896db55a03e43a1789886aa22a0ba4">operator=</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;t)=default</td></tr>
<tr class="memdesc:a55896db55a03e43a1789886aa22a0ba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment. <br/></td></tr>
<tr class="separator:a55896db55a03e43a1789886aa22a0ba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d71b20e7531f6f09c37e96799c358cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d71b20e7531f6f09c37e96799c358cf"></a>
__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a5d71b20e7531f6f09c37e96799c358cf">operator=</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;&amp;t)</td></tr>
<tr class="memdesc:a5d71b20e7531f6f09c37e96799c358cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move assignment. <br/></td></tr>
<tr class="separator:a5d71b20e7531f6f09c37e96799c358cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08a79780414069111c471d67af5676ac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08a79780414069111c471d67af5676ac"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a08a79780414069111c471d67af5676ac">Tensor</a> (DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a37d3ac0dffcaad29f09d6e85fb07b335">data</a>, const IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ac3e0306267da475d8140bf6d12cf4af6">sizes</a>[Dim])</td></tr>
<tr class="memdesc:a08a79780414069111c471d67af5676ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor that calculates strides with no padding. <br/></td></tr>
<tr class="separator:a08a79780414069111c471d67af5676ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5229af92051a9cb1120797806781116b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5229af92051a9cb1120797806781116b"></a>
__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><b>Tensor</b> (DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a37d3ac0dffcaad29f09d6e85fb07b335">data</a>, std::initializer_list&lt; IndexT &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ac3e0306267da475d8140bf6d12cf4af6">sizes</a>)</td></tr>
<tr class="separator:a5229af92051a9cb1120797806781116b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8da5c2001d2f5e97abe9f6ad9eed34a9"><td class="memItemLeft" align="right" valign="top">__host__ __device__&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a8da5c2001d2f5e97abe9f6ad9eed34a9">Tensor</a> (DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a37d3ac0dffcaad29f09d6e85fb07b335">data</a>, const IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ac3e0306267da475d8140bf6d12cf4af6">sizes</a>[Dim], const IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a9a0a293f287e9cba68f31c9e57b79c64">strides</a>[Dim])</td></tr>
<tr class="separator:a8da5c2001d2f5e97abe9f6ad9eed34a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae981a94263044f38be89d690dd958426"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae981a94263044f38be89d690dd958426"></a>
__host__ void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ae981a94263044f38be89d690dd958426">copyFrom</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;t, cudaStream_t stream)</td></tr>
<tr class="memdesc:ae981a94263044f38be89d690dd958426"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies a tensor into ourselves; sizes must match. <br/></td></tr>
<tr class="separator:ae981a94263044f38be89d690dd958426"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ce60d784817469d5b47b560da177b92"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ce60d784817469d5b47b560da177b92"></a>
__host__ void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a6ce60d784817469d5b47b560da177b92">copyTo</a> (<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; &amp;t, cudaStream_t stream)</td></tr>
<tr class="memdesc:a6ce60d784817469d5b47b560da177b92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies ourselves into a tensor; sizes must match. <br/></td></tr>
<tr class="separator:a6ce60d784817469d5b47b560da177b92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a013fac5bd3c78e90b35a6f46dbf3ffda"><td class="memTemplParams" colspan="2">template&lt;int OtherDim&gt; </td></tr>
<tr class="memitem:a013fac5bd3c78e90b35a6f46dbf3ffda"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a013fac5bd3c78e90b35a6f46dbf3ffda">isSame</a> (const <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, OtherDim, Contig, IndexT, PtrTraits &gt; &amp;rhs) const </td></tr>
<tr class="separator:a013fac5bd3c78e90b35a6f46dbf3ffda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab462574aa0756b701e52279c13449764"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:ab462574aa0756b701e52279c13449764"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ab462574aa0756b701e52279c13449764">cast</a> ()</td></tr>
<tr class="separator:ab462574aa0756b701e52279c13449764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bee6b10584a0a201dad5db3e3d37720"><td class="memTemplParams" colspan="2"><a class="anchor" id="a0bee6b10584a0a201dad5db3e3d37720"></a>
template&lt;typename U &gt; </td></tr>
<tr class="memitem:a0bee6b10584a0a201dad5db3e3d37720"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ const <br class="typebreak"/>
<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, Dim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a0bee6b10584a0a201dad5db3e3d37720">cast</a> () const </td></tr>
<tr class="memdesc:a0bee6b10584a0a201dad5db3e3d37720"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const version of <code>cast</code> <br/></td></tr>
<tr class="separator:a0bee6b10584a0a201dad5db3e3d37720"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab60b0711646ffe587b62a5434d53c6a"><td class="memTemplParams" colspan="2">template&lt;typename U &gt; </td></tr>
<tr class="memitem:aab60b0711646ffe587b62a5434d53c6a"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#aab60b0711646ffe587b62a5434d53c6a">castResize</a> ()</td></tr>
<tr class="separator:aab60b0711646ffe587b62a5434d53c6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2cdd4f1eecbbca286c0d594143030f3"><td class="memTemplParams" colspan="2"><a class="anchor" id="ae2cdd4f1eecbbca286c0d594143030f3"></a>
template&lt;typename U &gt; </td></tr>
<tr class="memitem:ae2cdd4f1eecbbca286c0d594143030f3"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ const <br class="typebreak"/>
<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, Dim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ae2cdd4f1eecbbca286c0d594143030f3">castResize</a> () const </td></tr>
<tr class="memdesc:ae2cdd4f1eecbbca286c0d594143030f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Const version of <code>castResize</code> <br/></td></tr>
<tr class="separator:ae2cdd4f1eecbbca286c0d594143030f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3a5fb3a903295b7d2f8cb2caae0352"><td class="memTemplParams" colspan="2"><a class="anchor" id="a9b3a5fb3a903295b7d2f8cb2caae0352"></a>
template&lt;typename U &gt; </td></tr>
<tr class="memitem:a9b3a5fb3a903295b7d2f8cb2caae0352"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a9b3a5fb3a903295b7d2f8cb2caae0352">canCastResize</a> () const </td></tr>
<tr class="memdesc:a9b3a5fb3a903295b7d2f8cb2caae0352"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if we can <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#aab60b0711646ffe587b62a5434d53c6a">castResize()</a> this tensor to the new type. <br/></td></tr>
<tr class="separator:a9b3a5fb3a903295b7d2f8cb2caae0352"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37d3ac0dffcaad29f09d6e85fb07b335"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37d3ac0dffcaad29f09d6e85fb07b335"></a>
__host__ __device__ DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a37d3ac0dffcaad29f09d6e85fb07b335">data</a> ()</td></tr>
<tr class="memdesc:a37d3ac0dffcaad29f09d6e85fb07b335"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a raw pointer to the start of our data. <br/></td></tr>
<tr class="separator:a37d3ac0dffcaad29f09d6e85fb07b335"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad35e0c816162fd08e372b21b79cab6c1"><td class="memItemLeft" align="right" valign="top">__host__ __device__ DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad35e0c816162fd08e372b21b79cab6c1">end</a> ()</td></tr>
<tr class="separator:ad35e0c816162fd08e372b21b79cab6c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a098dad7e211328d1ae8b00d02839ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a098dad7e211328d1ae8b00d02839ce"></a>
__host__ __device__ const <br class="typebreak"/>
DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a9a098dad7e211328d1ae8b00d02839ce">data</a> () const </td></tr>
<tr class="memdesc:a9a098dad7e211328d1ae8b00d02839ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a raw pointer to the start of our data (const). <br/></td></tr>
<tr class="separator:a9a098dad7e211328d1ae8b00d02839ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00d2d17504f63b9e834afac730a64324"><td class="memItemLeft" align="right" valign="top">__host__ __device__ DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a00d2d17504f63b9e834afac730a64324">end</a> () const </td></tr>
<tr class="separator:a00d2d17504f63b9e834afac730a64324"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c987316708113dafd11971092d59f69"><td class="memTemplParams" colspan="2"><a class="anchor" id="a7c987316708113dafd11971092d59f69"></a>
template&lt;typename U &gt; </td></tr>
<tr class="memitem:a7c987316708113dafd11971092d59f69"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ PtrTraits<br class="typebreak"/>
&lt; U &gt;::PtrType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a7c987316708113dafd11971092d59f69">dataAs</a> ()</td></tr>
<tr class="memdesc:a7c987316708113dafd11971092d59f69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype. <br/></td></tr>
<tr class="separator:a7c987316708113dafd11971092d59f69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad02cd32977ebf89636c8d085b4470c2e"><td class="memTemplParams" colspan="2"><a class="anchor" id="ad02cd32977ebf89636c8d085b4470c2e"></a>
template&lt;typename U &gt; </td></tr>
<tr class="memitem:ad02cd32977ebf89636c8d085b4470c2e"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ const <br class="typebreak"/>
PtrTraits&lt; const U &gt;::PtrType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad02cd32977ebf89636c8d085b4470c2e">dataAs</a> () const </td></tr>
<tr class="memdesc:ad02cd32977ebf89636c8d085b4470c2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cast to a different datatype. <br/></td></tr>
<tr class="separator:ad02cd32977ebf89636c8d085b4470c2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a204ea1c3232b51512a9c027bb44ee3c4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a204ea1c3232b51512a9c027bb44ee3c4"></a>
__host__ __device__ <br class="typebreak"/>
<a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor.html">detail::SubTensor</a>&lt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">TensorType</a>, <br class="typebreak"/>
Dim-1, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a204ea1c3232b51512a9c027bb44ee3c4">operator[]</a> (IndexT)</td></tr>
<tr class="memdesc:a204ea1c3232b51512a9c027bb44ee3c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a read/write view of a portion of our tensor. <br/></td></tr>
<tr class="separator:a204ea1c3232b51512a9c027bb44ee3c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6538556caad2fd01bd81ba441185d9f3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6538556caad2fd01bd81ba441185d9f3"></a>
__host__ __device__ const <br class="typebreak"/>
<a class="el" href="classfaiss_1_1gpu_1_1detail_1_1SubTensor.html">detail::SubTensor</a>&lt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">TensorType</a>, <br class="typebreak"/>
Dim-1, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a6538556caad2fd01bd81ba441185d9f3">operator[]</a> (IndexT) const </td></tr>
<tr class="memdesc:a6538556caad2fd01bd81ba441185d9f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a read/write view of a portion of our tensor (const). <br/></td></tr>
<tr class="separator:a6538556caad2fd01bd81ba441185d9f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d276c97faf432cdc9f3552da63c0d3c"><td class="memItemLeft" align="right" valign="top">__host__ __device__ IndexT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a2d276c97faf432cdc9f3552da63c0d3c">getSize</a> (int i) const </td></tr>
<tr class="separator:a2d276c97faf432cdc9f3552da63c0d3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57855c6e0c529a309168833017049ab5"><td class="memItemLeft" align="right" valign="top">__host__ __device__ IndexT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a57855c6e0c529a309168833017049ab5">getStride</a> (int i) const </td></tr>
<tr class="separator:a57855c6e0c529a309168833017049ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41f7f08246bf8584929693bb1896205f"><td class="memItemLeft" align="right" valign="top">__host__ __device__ IndexT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a41f7f08246bf8584929693bb1896205f">numElements</a> () const </td></tr>
<tr class="separator:a41f7f08246bf8584929693bb1896205f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae42c9c020682fd094958976d8e610ad"><td class="memItemLeft" align="right" valign="top">__host__ __device__ size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#aae42c9c020682fd094958976d8e610ad">getSizeInBytes</a> () const </td></tr>
<tr class="separator:aae42c9c020682fd094958976d8e610ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3e0306267da475d8140bf6d12cf4af6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3e0306267da475d8140bf6d12cf4af6"></a>
__host__ __device__ const IndexT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ac3e0306267da475d8140bf6d12cf4af6">sizes</a> () const </td></tr>
<tr class="memdesc:ac3e0306267da475d8140bf6d12cf4af6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size array. <br/></td></tr>
<tr class="separator:ac3e0306267da475d8140bf6d12cf4af6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a0a293f287e9cba68f31c9e57b79c64"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a0a293f287e9cba68f31c9e57b79c64"></a>
__host__ __device__ const IndexT *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a9a0a293f287e9cba68f31c9e57b79c64">strides</a> () const </td></tr>
<tr class="memdesc:a9a0a293f287e9cba68f31c9e57b79c64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the stride array. <br/></td></tr>
<tr class="separator:a9a0a293f287e9cba68f31c9e57b79c64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd445331bcc0373cf925f7a02660107c"><td class="memItemLeft" align="right" valign="top">__host__ __device__ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#acd445331bcc0373cf925f7a02660107c">isContiguous</a> () const </td></tr>
<tr class="separator:acd445331bcc0373cf925f7a02660107c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9266778f33c175457d29b5c6dcc1a444"><td class="memItemLeft" align="right" valign="top">__host__ __device__ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a9266778f33c175457d29b5c6dcc1a444">isConsistentlySized</a> (int i) const </td></tr>
<tr class="separator:a9266778f33c175457d29b5c6dcc1a444"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2d7f5e6725ff8b436d8b317553b15b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2d7f5e6725ff8b436d8b317553b15b5"></a>
__host__ __device__ bool&#160;</td><td class="memItemRight" valign="bottom"><b>isConsistentlySized</b> () const </td></tr>
<tr class="separator:ac2d7f5e6725ff8b436d8b317553b15b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31075cd6df497e4c1a7c7e47fa2603ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31075cd6df497e4c1a7c7e47fa2603ca"></a>
__host__ __device__ bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a31075cd6df497e4c1a7c7e47fa2603ca">isContiguousDim</a> (int i) const </td></tr>
<tr class="memdesc:a31075cd6df497e4c1a7c7e47fa2603ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the given dimension index has no padding. <br/></td></tr>
<tr class="separator:a31075cd6df497e4c1a7c7e47fa2603ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8b48391a291a7e214c7204d81cd9d73"><td class="memItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#aa8b48391a291a7e214c7204d81cd9d73">transpose</a> (int dim1, int dim2) const </td></tr>
<tr class="separator:aa8b48391a291a7e214c7204d81cd9d73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6df1805b76f74018bc94fffab8987ac"><td class="memTemplParams" colspan="2">template&lt;int NewDim&gt; </td></tr>
<tr class="memitem:ad6df1805b76f74018bc94fffab8987ac"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
NewDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad6df1805b76f74018bc94fffab8987ac">upcastOuter</a> ()</td></tr>
<tr class="separator:ad6df1805b76f74018bc94fffab8987ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70308137b566362d4cc37d3e71b3ae98"><td class="memTemplParams" colspan="2">template&lt;int NewDim&gt; </td></tr>
<tr class="memitem:a70308137b566362d4cc37d3e71b3ae98"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
NewDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a70308137b566362d4cc37d3e71b3ae98">upcastInner</a> ()</td></tr>
<tr class="separator:a70308137b566362d4cc37d3e71b3ae98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5591c571ac52482fc7ceea6ef99af794"><td class="memTemplParams" colspan="2">template&lt;int NewDim&gt; </td></tr>
<tr class="memitem:a5591c571ac52482fc7ceea6ef99af794"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
NewDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a5591c571ac52482fc7ceea6ef99af794">downcastOuter</a> ()</td></tr>
<tr class="separator:a5591c571ac52482fc7ceea6ef99af794"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bcfb3f04077a42e0d8c924e11b2d637"><td class="memTemplParams" colspan="2">template&lt;int NewDim&gt; </td></tr>
<tr class="memitem:a4bcfb3f04077a42e0d8c924e11b2d637"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
NewDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a4bcfb3f04077a42e0d8c924e11b2d637">downcastInner</a> ()</td></tr>
<tr class="separator:a4bcfb3f04077a42e0d8c924e11b2d637"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3095eaec5711fe697c16c21598a8ddc1"><td class="memTemplParams" colspan="2">template&lt;int SubDim&gt; </td></tr>
<tr class="memitem:a3095eaec5711fe697c16c21598a8ddc1"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
SubDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a3095eaec5711fe697c16c21598a8ddc1">view</a> (DataPtrType at)</td></tr>
<tr class="separator:a3095eaec5711fe697c16c21598a8ddc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67ccf916f78dacf0ae0d4816a663eb3f"><td class="memTemplParams" colspan="2">template&lt;int SubDim&gt; </td></tr>
<tr class="memitem:a67ccf916f78dacf0ae0d4816a663eb3f"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
SubDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a67ccf916f78dacf0ae0d4816a663eb3f">view</a> ()</td></tr>
<tr class="separator:a67ccf916f78dacf0ae0d4816a663eb3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a782cd978394660371a22229f02e49e60"><td class="memItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
Dim, Contig, IndexT, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a782cd978394660371a22229f02e49e60">narrowOutermost</a> (IndexT start, IndexT size)</td></tr>
<tr class="separator:a782cd978394660371a22229f02e49e60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58d7a953431def329bac11374679c2dd"><td class="memItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
Dim, false, IndexT, PtrTraits &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a58d7a953431def329bac11374679c2dd">narrow</a> (int dim, IndexT start, IndexT size)</td></tr>
<tr class="separator:a58d7a953431def329bac11374679c2dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad16d6d4cd302805370d21ef1a12a21f6"><td class="memTemplParams" colspan="2">template&lt;int NewDim&gt; </td></tr>
<tr class="memitem:ad16d6d4cd302805370d21ef1a12a21f6"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, <br class="typebreak"/>
NewDim, Contig, IndexT, <br class="typebreak"/>
PtrTraits &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad16d6d4cd302805370d21ef1a12a21f6">view</a> (std::initializer_list&lt; IndexT &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ac3e0306267da475d8140bf6d12cf4af6">sizes</a>)</td></tr>
<tr class="separator:ad16d6d4cd302805370d21ef1a12a21f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a08024dbcaed3c1235cac62b476f14509"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08024dbcaed3c1235cac62b476f14509"></a>
DataPtrType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a08024dbcaed3c1235cac62b476f14509">data_</a></td></tr>
<tr class="memdesc:a08024dbcaed3c1235cac62b476f14509"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raw pointer to where the tensor data begins. <br/></td></tr>
<tr class="separator:a08024dbcaed3c1235cac62b476f14509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46c20e6be3ce16feb99f8d3a5ee268c9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a46c20e6be3ce16feb99f8d3a5ee268c9"></a>
IndexT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a46c20e6be3ce16feb99f8d3a5ee268c9">stride_</a> [Dim]</td></tr>
<tr class="memdesc:a46c20e6be3ce16feb99f8d3a5ee268c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of strides (in sizeof(T) terms) per each dimension. <br/></td></tr>
<tr class="separator:a46c20e6be3ce16feb99f8d3a5ee268c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe1bd60ecb861eabafaad7362a68ec1f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe1bd60ecb861eabafaad7362a68ec1f"></a>
IndexT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#afe1bd60ecb861eabafaad7362a68ec1f">size_</a> [Dim]</td></tr>
<tr class="memdesc:afe1bd60ecb861eabafaad7362a68ec1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size per each dimension. <br/></td></tr>
<tr class="separator:afe1bd60ecb861eabafaad7362a68ec1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt;<br/>
class faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;</h3>

<p>Our tensor type. </p>
<p>Templated multi-dimensional array that supports strided access of elements. Main access is through <code>operator[]</code>; e.g., <code>tensor[x][y][z]</code>.</p>
<ul>
<li><code>T</code> is the contained type (e.g., <code>float</code>)</li>
<li><code>Dim</code> is the tensor rank</li>
<li>If <code>Contig</code> is true, then the tensor is assumed to be</li>
<li>contiguous, and only operations that make sense on contiguous</li>
<li>arrays are allowed (e.g., no transpose). Strides are still</li>
<li>calculated, but innermost stride is assumed to be 1.</li>
<li><code>IndexT</code> is the integer type used for size/stride arrays, and for</li>
<li>all indexing math. Default is <code>int</code>, but for large tensors, <code>long</code></li>
<li>can be used instead.</li>
<li><code>PtrTraits</code> are traits applied to our data pointer (T*). By default,</li>
<li>this is just T*, but RestrictPtrTraits can be used to apply T*</li>
<li><b>restrict</b> for alias-free analysis. </li>
</ul>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00031">31</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8da5c2001d2f5e97abe9f6ad9eed34a9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::<a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a> </td>
          <td>(</td>
          <td class="paramtype">DataPtrType&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const IndexT&#160;</td>
          <td class="paramname"><em>sizes</em>[Dim], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const IndexT&#160;</td>
          <td class="paramname"><em>strides</em>[Dim]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor that takes arbitrary size/stride arrays. Errors if you attempt to pass non-contiguous strides to a contiguous tensor. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00087">87</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ab462574aa0756b701e52279c13449764"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;typename U &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, Dim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::cast </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cast to a tensor of a different type of the same size and stride. U and our type T must be of the same size </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00203">203</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="aab60b0711646ffe587b62a5434d53c6a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;typename U &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; U, Dim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::castResize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Cast to a tensor of a different type which is potentially a different size than our type T. <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html" title="Our tensor type. ">Tensor</a> must be aligned and the innermost dimension must be a size that is a multiple of sizeof(U) / sizeof(T), and the stride of the innermost dimension must be contiguous. The stride of all outer dimensions must be a multiple of sizeof(U) / sizeof(T) as well. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00225">225</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a4bcfb3f04077a42e0d8c924e11b2d637"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int NewDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, NewDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::downcastInner </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Downcast a tensor of dimension <code>D</code> to some tensor of dimension D' &lt; D by collapsing the leading dimensions. asserts if there is padding on the leading dimensions. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00483">483</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a5591c571ac52482fc7ceea6ef99af794"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int NewDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, NewDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::downcastOuter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Downcast a tensor of dimension <code>D</code> to some tensor of dimension D' &lt; D by collapsing the leading dimensions. asserts if there is padding on the leading dimensions. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00438">438</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ad35e0c816162fd08e372b21b79cab6c1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a raw pointer to the end of our data, assuming continuity </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00168">168</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a00d2d17504f63b9e834afac730a64324"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ DataPtrType <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns a raw pointer to the end of our data, assuming continuity (const) </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00180">180</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a2d276c97faf432cdc9f3552da63c0d3c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::getSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the size of a given dimension, <code>[0, Dim - 1]</code>. No bounds checking. </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00210">210</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="aae42c9c020682fd094958976d8e610ad"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ size_t <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::getSizeInBytes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>If we are contiguous, returns the total size in bytes of our data </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00226">226</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a57855c6e0c529a309168833017049ab5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::getStride </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the stride of a given dimension, <code>[0, Dim - 1]</code>. No bounds checking. </p>

<p>Definition at line <a class="el" href="Tensor_8cuh_source.html#l00216">216</a> of file <a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a9266778f33c175457d29b5c6dcc1a444"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ bool <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::isConsistentlySized </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns whether a given dimension has only increasing stride from the previous dimension. A tensor that was permuted by exchanging size and stride only will fail this check. If <code>i == 0</code> just check <code>size &gt; 0</code>. Returns <code>false</code> if <code>stride</code> is <code>&lt;= 0</code>. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00317">317</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="acd445331bcc0373cf925f7a02660107c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ bool <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::isContiguous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns true if there is no padding within the tensor and no re-ordering of the dimensions. </p>
<div class="fragment"><div class="line">(stride(i) == size(i + 1) * stride(i + 1)) &amp;&amp; stride(dim - 1) == 0</div>
</div><!-- fragment --> 
<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00298">298</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a013fac5bd3c78e90b35a6f46dbf3ffda"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T, int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int OtherDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ bool <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::isSame </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, OtherDim, Contig, IndexT, PtrTraits &gt; &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns true if the two tensors are of the same dimensionality, size and stride. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00178">178</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a58d7a953431def329bac11374679c2dd"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, false, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::narrow </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IndexT&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IndexT&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a tensor of the same dimension that is a view of the original tensor with the specified dimension restricted to the elements in the range [start, start + size). Can occur in an arbitrary dimension, and is possibly non-contiguous </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00577">577</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a782cd978394660371a22229f02e49e60"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::narrowOutermost </td>
          <td>(</td>
          <td class="paramtype">IndexT&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">IndexT&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a tensor of the same dimension that is a view of the original tensor with the specified dimension restricted to the elements in the range [start, start + size) </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00553">553</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a41f7f08246bf8584929693bb1896205f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ IndexT <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::numElements </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the total number of elements contained within our data (product of <code>getSize(i)</code>) </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00285">285</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="aa8b48391a291a7e214c7204d81cd9d73"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::transpose </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dim1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dim2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a tensor of the same dimension after transposing the two dimensions given. Does not actually move elements; transposition is made by permuting the size/stride arrays. If the dimensions are not valid, asserts. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00353">353</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a70308137b566362d4cc37d3e71b3ae98"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int NewDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, NewDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::upcastInner </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Upcast a tensor of dimension <code>D</code> to some tensor of dimension D' &gt; D by padding the lowest/most varying dimensions by 1 e.g., upcasting a 2-d tensor <code>[2][3]</code> to a 4-d tensor <code>[2][3][1][1]</code> </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00411">411</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ad6df1805b76f74018bc94fffab8987ac"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int NewDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, NewDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::upcastOuter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Upcast a tensor of dimension <code>D</code> to some tensor of dimension D' &gt; D by padding the leading dimensions by 1 e.g., upcasting a 2-d tensor <code>[2][3]</code> to a 4-d tensor <code>[1][1][2][3]</code> </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00382">382</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a3095eaec5711fe697c16c21598a8ddc1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int SubDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, SubDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::view </td>
          <td>(</td>
          <td class="paramtype">DataPtrType&#160;</td>
          <td class="paramname"><em>at</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a tensor that is a view of the <code>SubDim</code>-dimensional slice of this tensor, starting at <code>at</code>. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00526">526</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="a67ccf916f78dacf0ae0d4816a663eb3f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT , template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int SubDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, SubDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::view </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a tensor that is a view of the <code>SubDim</code>-dimensional slice of this tensor, starting where our data begins </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00546">546</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ad16d6d4cd302805370d21ef1a12a21f6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T , int Dim, bool Contig, typename IndexT, template&lt; typename U &gt; class PtrTraits&gt; </div>
<div class="memtemplate">
template&lt;int NewDim&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">Tensor</a>&lt; T, NewDim, Contig, IndexT, PtrTraits &gt; <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html">faiss::gpu::Tensor</a>&lt; T, Dim, Contig, IndexT, PtrTraits &gt;::view </td>
          <td>(</td>
          <td class="paramtype">std::initializer_list&lt; IndexT &gt;&#160;</td>
          <td class="paramname"><em>sizes</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns a view of the given tensor expressed as a tensor of a different number of dimensions. Only works if we are contiguous. </p>

<p>Definition at line <a class="el" href="Tensor-inl_8cuh_source.html#l00604">604</a> of file <a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="Tensor_8cuh_source.html">Tensor.cuh</a></li>
<li><a class="el" href="Tensor-inl_8cuh_source.html">Tensor-inl.cuh</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
